#!/usr/bin/python
# -*- coding: utf-8 -*-

#-------------------------------------------------
#Create At: 2008-6-18 下午11:57:22 
#Create By: Fla.sam
#
#DESC: google app engine proxy auto config scripy
#
#-------------------------------------------------

from pac import Pac
from twisted.web import resource
from twisted.web import static

#registry = static.Registry()
registry.setComponent(Pac, Pac())
my_pac = registry.getComponent(Pac)

class AutoConfigResource(resource.Resource):

    def render_GET(self, request):
        request.setHeader('content-type','application/x-ns-proxy-autoconfig')
        return my_pac.getPac()
        
resource = AutoConfigResource()
